package tk.mybatis.simple.plugin;

import java.util.*;

import org.apache.ibatis.cache.CacheKey;
import org.apache.ibatis.mapping.BoundSql;
import org.apache.ibatis.session.RowBounds;

public interface Dialect {

	boolean skip(String msId, Object parameterObject, RowBounds rowBounds);

	boolean beforeCount(String msId, Object parameterObject, RowBounds rowBounds);

	String getCountSql(BoundSql boundSql, Object parameterObject, RowBounds rowBounds, CacheKey countKey);

	void afterCount(Long count, Object parameterObject, RowBounds rowBounds);

	boolean beforePage(String msId, Object parameterObject, RowBounds rowBounds);
	
	String getPageSql(BoundSql boundSql, Object parameterObject, RowBounds rowBounds, CacheKey pageKey);
	
	Object afterPage(List pageList, Object parameterObject, RowBounds rowBounds);

	void setProperties(Properties properties);
}
